package com.xinchao.service;

import com.xinchao.exception.ServiceException;
import com.xinchao.model.DeviceAdvertisement;

/**
 * @author dxy
 * @date 2018/11/6 17:29
 */
public interface DeviceAdvertisementService {
	/**
	 * 保存终端
	 *
	 * @param deviceAdvertisement 终端广告
	 * @throws ServiceException
	 */
	void saveDeviceAdvertisement(DeviceAdvertisement deviceAdvertisement) throws ServiceException;

	/**
	 * 通过机器码修改终端广告
	 *
	 * @param deviceNumber 机器码
	 * @throws ServiceException
	 */
	void updateDeviceAdvertisementByDeviceNumber(DeviceAdvertisement deviceAdvertisement) throws ServiceException;

	/**
	 * 报告已下载广告数量
	 *
	 * @param deviceAdvertisement DeviceAdvertisement
	 * @throws ServiceException
	 */
	void reportDownloadedAdvertisementNum(DeviceAdvertisement deviceAdvertisement) throws ServiceException;

	/**
	 * 通过机器码获取终端广告
	 *
	 * @param deviceNumber 机器码
	 * @return DeviceAdvertisement
	 */
	DeviceAdvertisement getDeviceAdvertisementByDeviceNumber(String deviceNumber) throws ServiceException;
}
